﻿using System.ComponentModel.DataAnnotations;
using System.Web.DynamicData;
using System.Web.UI.WebControls;
using System;
using badminton;

namespace badminton
{
    public partial class Site : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string str = Utility.getWebRootVirtual(Request) + "/index.aspx";
            if (Session["Login"] == null)
            {
                //Response.Write("<script type='text/javascript'>alert('您还未登录，请先登录！');window.open('" + str + "','_self');</script>");
                return;
            }
            
            LoginSession ls= Session["Login"] as LoginSession;
            if(ls.m_loginType=="学员")
            {
                //Response.Write("<script type='text/javascript'>alert('学员不可以进入后台。');window.open('" + str + "','_self');</script>");
                return;
            }
        }

    }
}
